<?php

require 'form_strain.inc';

if(isset($_GET['name']))
{
	$name = str_replace('%20', ' ', $_GET['name'] );
	$strain = R::findOne( 'weedstrain', 'name=\'' . $name . '\'' );	

	if($strain == false)
	{
		print 'Strain not found.';
	}
	else
	{
		$f = new Form_Strain($strain);
		$f->Render( );
	}	
}

print '<br /><br /><a href="/strains">Strains List</a>';
